.px2px(@name, @px){ 
    @{name}: round(@px / 2) * 1px; 
    [data-dpr="2"] & { 
        @{name}: @px * 1px; 
    } 
    // for mx3 
    [data-dpr="2.5"] & { 
        @{name}: round(@px * 2.5 / 2) * 1px; 
    } 
    // for 小米note 
    [data-dpr="2.75"] & { 
        @{name}: round(@px * 2.75 / 2) * 1px; 
    } 
    [data-dpr="3"] & { 
        @{name}: round(@px / 2 * 3) * 1px 
    } 
    // for 三星note4 
    [data-dpr="4"] & { 
        @{name}: @px * 2px; 
    } 
}
html, body, section, input {
    padding: 0;
    margin: 0;
}
html {
    font-family: "Microsoft Yahei",
}
body {
    main {
        position: absolute;
        width: 100%;
        height: 100%;
    }
    .chat-room {
        // position: absolute;
        float: left;
        // bottom: 1rem;
        width: 100%;
        // height: 100%;
        margin-bottom: 1rem;
        overflow-y: auto;
        // background-color: yellow;
    }
    .chat-info-other, .chat-info-self {
        padding: 6px 20px;
        overflow: hidden;
    }
    .chat-content {
        display: inline-block;
        // float: left;
        background-color: #cecece;
        text-align: left;
        padding: 6px 12px;
        border-radius: 8px;
        .px2px(font-size, 32);
    }
    .chat-info-other {
        .user-info {
            // float: left;
        }
    }
    .username {
        margin-right: 5px;
    }
    .chat-info-self {
        .user-info {
            overflow: hidden;
        }
        .info-con {
            float: right;
        }
        .chat-content {
            float: right;
            background-color: rgb(20, 146, 246);
            color: #fff;
        }
    }
    .chat-bar {
        position: absolute;
        left: 0;
        bottom: 0;
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        height: 1rem;
        background-color: lightblue;
        text-align: center;
        line-height: 1rem;
        input {
            border: none;
        }
        .chat-info {
            width: 6rem;
            height: 60/75rem;
            padding: 4/75rem 20/75rem;
            box-sizing: border-box;
            .px2px(font-size, 24);
            // margin-top: 0.1rem;
            // float: left;
        }
        .submit-info {
            width: 3rem;
            height: 60/75rem;
            .px2px(font-size, 24);
            // margin-top: 0.1rem;
            // float: right;
        }
    }
}
